package com.gidgabs.modules.api.service.impl;

import com.gidgabs.modules.api.service.TbProductReadService;
import com.gidgabs.modules.dao.TbProductReadDao;
import com.gidgabs.modules.entity.TbProductReadEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TbProductReadServiceImpl implements TbProductReadService {
	@Autowired
	private TbProductReadDao productReadDao;
	
	@Override
	public TbProductReadEntity queryObject(Integer id){
		return productReadDao.queryObject(id);
	}

	@Override
	public TbProductReadEntity queryByObject(TbProductReadEntity productRead) {
		return productReadDao.queryByObject(productRead);
	}

	@Override
	public List<TbProductReadEntity> queryList(Map<String, Object> map){
		return productReadDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return productReadDao.queryTotal(map);
	}
	
	@Override
	public void save(TbProductReadEntity productRead){
		productReadDao.save(productRead);
	}
	
	@Override
	public void update(TbProductReadEntity productRead){
		productReadDao.update(productRead);
	}
	
	@Override
	public void delete(Integer id){
		productReadDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		productReadDao.deleteBatch(ids);
	}

	@Override
	public int queryCount(TbProductReadEntity tbProductReadEntity) {
		return productReadDao.queryCount(tbProductReadEntity);
	}

}
